package com.nvshen.zhangmeiying.utils;


import com.nvshen.zhangmeiying.model.Message;

/**
 * Created by wxc on 14-8-11.
 */
public class UrlUtils
{
    //    private static final String BASE_URL = "http://42.96.195.75:8777/";
    private static final String BASE_URL = "http://nvshen.aixiehou.cn/";
//    private static final String BASE_URL = "http://test.aixiehou.cn/";

    public static final String getLatestUrl(int pageIndex, int uid)
    {
        return BASE_URL + "article/latest/?page=" + Integer.toString(pageIndex) + "&uid=" + uid;
    }

    public static final String getHotestUrl(int pageIndex, int uid)
    {
        return BASE_URL + "article/hot/?page=" + Integer.toString(pageIndex) + "&uid=" + uid;
    }

    public static final String getAddPlayTimes(int articleId)
    {
        return BASE_URL + "article/increase_play_times/?article_id=" + articleId;
    }

    public static final String getLike(int uid, int articleId)
    {
        return BASE_URL + "article/up/?uid=" + uid + "&article_id=" + articleId;
    }

    public static final String getCancelLike(int uid, int articleId)
    {
        return BASE_URL + "article/cancel_up/?uid=" + uid + "&article_id=" + articleId;
    }

    public static final String getRegisterURL()
    {
        return BASE_URL + "member/register/";
    }

    public static final String getLogin(String name, String password)
    {
        return BASE_URL + "member/login/?login=" + name + "&password=" + password;
    }

    public static final String getChangeAvatar(int uid, String url)
    {
        return BASE_URL + "member/change_avatar/?uid=" + uid + "&avatar=" + url;
    }

    public static final String getChangeNickname(int uid, String nickName)
    {
        return BASE_URL + "member/change_nickname/?uid=" + uid + "&nickname=" + nickName;
    }

    public static final String getMessageCount(int uid)
    {
        return BASE_URL + "member/get_message_count/?uid=" + uid;
    }

    public static final String getFollow(int follow_uid, int aid, int uid)
    {
        return BASE_URL + "member/add_follow/?followed_uid=" + follow_uid + "&uid=" + uid + "&article_id=" + aid;
    }

    public static final String getCancelFollow(int follow_uid, int uid)
    {
        return BASE_URL + "member/cancel_follow/?followed_uid=" + follow_uid + "&uid=" + uid;
    }

    public static final String getComment(int article_id, int page, int uid)
    {
        return BASE_URL + "comment/get/?article_id=" + article_id + "&page=" + page + "&uid=" + uid;
    }

    public static final String getPublishComment()
    {
        return BASE_URL + "comment/publish_normal/";
    }

    public static final String getPublishAt()
    {
        return BASE_URL + "comment/publish_sub/";
    }

    public static final String getFollowList(int page, int uid)
    {
        return BASE_URL + "member/get_followed_article_list/?uid=" + uid + "&page=" + page;
    }

    public static final String getMyArticle(int page, int uid)
    {
        return BASE_URL + "article/get_by_user/?user_id=" + uid + "&page=" + page;
    }

    public static final String getMyComment(int page, int uid)
    {
        return BASE_URL + "comment/get_article_list_by_comment_user/?user_id=" + uid + "&page=" + page;
    }

    public static final String getMyVote(int page, int uid)
    {
        return BASE_URL + "article/get_all_vote_up/?user_id=" + uid + "&page=" + page;
    }

    public static final String getPublishArticle()
    {
        return BASE_URL + "article/publish/";
    }

    public static final String getGiftUrl(int to_uid, int amount, int gift_type)
    {
        return BASE_URL + "member/give_gift/?to_uid=" + to_uid + "&amount=" + amount + "&gift_type=" + gift_type;
    }

    public static final String getDepositUrl(int uid, int money)
    {
        return BASE_URL + "record/deposit/?uid=" + uid + "&amount=" + money * 200 + "&money=" + money;
    }

    public static final String getProfileUrl(int uid)
    {
        return BASE_URL + "member/get_profile/?uid=" + uid;
    }

    public static final String getFensiUrl(int uid, int page)
    {
        return BASE_URL + "member/get_fensi/?uid=" + uid + "&page=" + page;
    }

    public static final String getRefreshMessageUrl()
    {
        return BASE_URL + "message/refresh_message/";
    }

    public static final String getGetMessageByTypeUrl(int page, int message_type)
    {
        return BASE_URL + "message/get_message_by_type/?message_type=" + message_type + "&page=" + page;
    }


    public static final String getGetCommentMessage(int page)
    {
        return BASE_URL + "message/get_message_by_type/?message_type=" + Message.MESSAGE_TYPE_COMMENT + "&page=" + page;
    }

    public static final String getGetVoteMessage(int page)
    {
        return BASE_URL + "message/get_message_by_type/?message_type=" + Message.MESSAGE_TYPE_VOTE_UP + "&page=" + page;
    }

    public static final String getGetGiftMessage(int page)
    {
        return BASE_URL + "message/get_message_by_type/?message_type=" + Message.MESSAGE_TYPE_GIFT + "&page=" + page;
    }

    public static final String getGetFollowMessage(int page)
    {
        return BASE_URL + "message/get_message_by_type/?message_type=" + Message.MESSAGE_TYPE_FEED_YOU + "&page=" + page;
    }

    public static final String getGetSystemMessage(int page)
    {
        return BASE_URL + "message/get_message_by_type/?message_type=" + Message.MESSAGE_TYPE_SYSTEM + "&page=" + page;
    }

    public static final String getSendMessageUrl(String content, int to_uid)
    {
        return BASE_URL + "im/send/?to_uid=" + to_uid + "&content=" + content;
    }

    public static final String getAllConversation()
    {
        return BASE_URL + "im/get_all/";
    }

    public static final String getUnreadConversation()
    {
        return BASE_URL + "im/get_unread/";
    }

    public static final String getPurchaseIM(int uid)
    {
        return BASE_URL + "record/purchase_im/?uid=" + uid;
    }

    public static final String getPurchaseOther(int to_uid, int amount, String description)
    {
        return BASE_URL + "record/purchase_im/?to_uid=" + to_uid + "&amount=" + amount + "&description=" + description;
    }

    public static final String withdraw(int amount, String bankInfo, String realName)
    {
        return BASE_URL + "record/withdraw/?amount=" + 100 + "&bank=" + bankInfo + "&real_name=" + realName;
    }
}
